package com.ruoyi.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 危险品采购记录对象 danger_goods_pur
 * 
 * @author qiancheng
 * @date 2025-06-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("danger_goods_pur")
public class DangerGoodsPur extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 采购记录ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 危险品名称 */
    @Excel(name = "危险品名称")
    @TableField(value = "goods_name")
    private String goodsName;

    /** 购买人ID */
    @Excel(name = "购买人ID")
    @TableField(value = "person_id")
    private String personId;

    /** 购买时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购买时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "pur_time")
    private Date purTime;

    /** 单位（kg/m³等） */
    @Excel(name = "单位", readConverterExp = "k=g/m³等")
    @TableField(value = "unit")
    private String unit;

    /** 购买数量 */
    @Excel(name = "购买数量")
    @TableField(value = "quantity")
    private Long quantity;

    /**
     * 人员名称
     */
    @TableField(exist = false)
    private String personName;

    /** 所属年份 */
    @TableField(exist = false)
    private Integer belongYear;

    /** 所属月份 */
    @TableField(exist = false)
    private Integer belongMonth;


}
